package com.marst.first.bean.VO;

import lombok.Data;

@Data
public class Result {

    private int code;
    private String message;
    private Object data;

    public Result(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public Result(int code,String message, Object data) {
        this.code = code;
        this.data = data;
        this.message = message;
    }

    public static Result ok(){
        return new Result(200,"请求成功");
    }
    public static Result ok(Object data){
        return new Result(200,"请求成功",data);
    }
    public static Result error(){
        return new Result(203,"请求失败");
    }
}
